/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication6.DomainLayer;

import java.io.Serializable;

/**
 *
 * @author meydlo
 */

//
public class Worker extends Person implements Serializable
{

    //
    private double salary ;

    //
    private int type ;


    //
    private String password ;

    //
    public Worker(String name, String phoneNo, String address,double salary,int type,String password,long id)
    {
       super(name, phoneNo, address, id);
       
       this.salary=salary;
       this.type=type;
       this.password=password;
    }


	//
    public void setType (int type)
    {
        this.type=type;
    }


	//
    public void setPassword (String password)
    {
        this.password=password;
    }

	//
    public int getType ()
    {
        return type;
    }


	//
    public String getPassword ()
    {
        return password;
    }

    //
    public void setSalary(double salary)
    {
        this.salary=salary;
    }

    //
    public double getSalary()
    {
        return salary;
    }
    
    public void printWorkerInfo()
    {
       printPersonInfo();
        System.out.println(
                "\n type: "+getType()+
                "\n discount: "+getSalary()
                );
    }


}
